#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "QMessageBox"
#include "QString"
#include "QFileDialog"
#include "QLabel"
#include "iostream"
#include "string"
#include "QGraphicsScene"


// namespace plt  = matplotlibcpp;

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    // connect(ui->OpenAction,&QAction::triggered,&MainWindow::projectOpen);

}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::projectOpen()
{
    QString mapPath = QFileDialog::getOpenFileName(this,tr("打开项目"),QString(),tr("地图数据 （*.txt *.bin *pro）"));
    if(mapPath.isEmpty() ==false){
        if(mapPath.endsWith(".txt")){
//将地图绘制出来，应该用个函数
        }
    }
}

void MainWindow::on_action_Qt_5_triggered()
{
    QMessageBox::aboutQt(this,"关于Qt5");
}

void MainWindow::on_AboutAction_triggered()
{
    QMessageBox::about(this,"关于此软件","此软件是基于Apollo开发的的高精度地图Api测试软件");
}
